const root ='http://localhost/diancan/public/index.php/api/wx/' //API根路径
//简化uni.request
const request = (url, data = '', method = 'GET') => {
	return new Promise(resolve => {
		uni.request({
			url: root + url,
			method: method,
			data: data,
			success(res) {
				resolve(res.data)
			},
			fail(res) {
				console.log(res.data)
			}
		})
	})
}
export default {root,request};